// export const constantRoutes = []
import { RouterTy } from '@/types/router'

export const asyncRouters: RouterTy = [
  {
    path: '/',
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard'),
        meta: { title: '首页', icon: 'table' }
      }
    ]
  },
  {
    path: '/acl',
    redirect: '/acl/user/list',
    meta: { title: '用户管理', icon: 'table' },
    children: [
      {
        path: 'user/list',
        name: 'User',
        component: () => import('@/views/acl/user'),
        meta: { title: '用户管理', icon: 'table' }
      },
      {
        path: 'role/list',
        name: 'User',
        component: () => import('@/views/acl/role'),
        meta: { title: '角色管理', icon: 'table' }
      },
      {
        name: 'RoleAuth',
        path: '/acl/role/auth',
        component: () => import('@/views/acl/role/roleAuth.tsx'),
        hidden: true
      }
    ]
  },
  {
    path: '/product',
    redirect: '/product/trademark',
    meta: { title: '商品管理', icon: 'table' },
    children: [
      {
        path: 'trademark/list',
        name: 'Trademark',
        component: () => import('@/views/product/trademark/index'),
        meta: { title: '品牌管理', icon: 'table' }
      }
    ]
  },
  {
    path: '/*',
    component: () => import('@/views/404')
  }
]
